<%= form_for user, html: { class: 'space-y-4' }, data: { turbo_frame: :_top } do |f| %>
  <div class="space-y-2">
    <div class="form-control">
      <%= f.label :first_name, class: 'label' %>
      <%= f.text_field :first_name, required: true, class: 'base-input', dir: 'auto' %>
    </div>
    <div class="form-control">
      <%= f.label :last_name, class: 'label' %>
      <%= f.text_field :last_name, required: true, class: 'base-input', dir: 'auto' %>
    </div>
    <div class="form-control">
      <%= f.label :email, class: 'label' %>
      <%= f.email_field :email, required: true, class: 'base-input' %>
    </div>
    <div class="form-control">
      <%= f.label :password, class: 'label' %>
      <%= f.password_field :password, required: user.new_record?, class: 'base-input' %>
    </div>
    <% if f.object != current_user %>
      <%= render 'role_select', f: %>
    <% end %>
  </div>
  <div class="form-control pt-2">
    <%= f.button button_title, class: 'base-button' %>
  </div>
<% end %>
